package com.ycj.design.structure.proxy;

import com.ycj.design.structure.proxy.IBuyer;

/**
 * 中介
 * @author xiyang.ycj
 * @since Nov 21, 2019 18:01:09 PM
 */
public class ProxyBuyer implements IBuyer {

    private IBuyer buyer;

    public ProxyBuyer(IBuyer buyer) {
        this.buyer = buyer;
    }

    @Override
    public void buy() {
        System.out.println("中介--买车记录---找到车源");
        buyer.buy();
        System.out.println("中介--买车记录---交易完成--记录业绩");
    }
}
